package br.com.nooclix.salon.servlet.util;

import java.net.InetAddress;
import java.util.Calendar;

public class UtilitysServlet {

	public String getHostAddress() {

		try {
			return InetAddress.getLocalHost().getHostAddress();
		} catch (Exception e) {
			return "localhost";
		}

	}

	public static Calendar createDateByValues(int day, int month, int year) {
		Calendar calendar = Calendar.getInstance();
		
		calendar.set(Calendar.DAY_OF_MONTH, day);
		
		calendar.set(Calendar.MONTH, month);
		
		calendar.set(Calendar.YEAR, year);

		return calendar;
	}

}